<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 
<style type="text/css">
<!--
#deptForm input{
	margin:3px;
}
#depts li{
	list-style:none;
}

#depts a {font-size:9px}   
#depts a:link {color: blue; text-decoration:none;} //未访问：蓝色、无下划线   
#depts a:active:{color: blue; } //激活：红色   
#depts a:visited {color:purple;text-decoration:none;} //已访问：紫色、无下划线   
#depts a:hover {color: red; } //鼠标移近：红色、下划线   
-->
</style>
<div id="deptForm" style="padding:5px;border-bottom:1px solid blue">
	<input id="id" type="hidden" />
	<label>代码</label><input id="code" type="text" disabled="disabled"/><br/>
	<label>名称</label><input id="name" type="text" disabled="disabled"/><br/>
	<input type="button" value="添加" onclick="addDept()"/>&nbsp;&nbsp;
	<input type="button" value="保存" onclick="saveDept()"/>&nbsp;&nbsp;
	<input type="button"  value="删除" onclick="delDept()"/> 
</div>
<div>
<ul id='depts' >
<c:forEach items="${deptlist}" var="p">
	<li>
		<input chk="dept" type="checkbox" value="${p.id}"/>
		<a href="javascript:return void(0);" onclick="setDept('${p.id}','${p.code}','${p.name}');loadEmps('${p.id}');">[${p.code}]${p.name}</a>
	</li>
</c:forEach>
</ul>
</div>

